<?php

class Adept_Exception extends Exception 
{
    
    protected $params;
    
    public function __construct($message, $code = 0, $params = array()) 
    {
        parent::__construct($message, $code);
        $this->params = $params;    
    }
    
    public function __toString() 
    {
        
        require_once('Adept/Exception/Output.php');
        
        $output = new Adept_Exception_Output($this);
        $output->setParams($this->params);
        return $output->getString();    
    }
    
    public function getParams() 
    {
        return $this->params;
    }
    
    public function setParams($params) 
    {
        $this->params = $params;
    }
    
}
